/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 */

package com.example.omsdkdemo.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;

import com.example.omsdkdemo.manager.OmSdkManager;

/**
 * 功能描述
 *
 * @since 2023-02-02
 */
public abstract class BaseDialogFragment extends DialogFragment {
    /**
     * mView
     */
    protected View mView;

    /**
     * mContext
     */
    protected Context mContext;

    /**
     * layoutId
     */
    protected int layoutId;

    protected OmSdkManager omSdkManager;

    public BaseDialogFragment(int contentLayoutId, Context context) {
        super(contentLayoutId);
        layoutId = contentLayoutId;
        mContext = context;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
        @Nullable Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    /**
     * initView
     */
    protected void initView() {
        LayoutInflater inflater = requireActivity().getLayoutInflater();
        mView = inflater.inflate(layoutId, null);
    }
}
